package com.thon.service.project.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.thon.dao.project.ProjectRecommendDao;
import com.thon.dao.util.Page;
import com.thon.entity.project.ProjectRecommend;
import com.thon.entity.project.ProjectShare;
import com.thon.service.project.ProjectRecommendService;

/**
 * @file ProjectRecommendServiceImpl.java
 * @author Zemo
 * @mail zemochen@gmail.com
 * @data 2013年11月18日 下午2:30:42
 * @description: TODO
 */
@Service
@Transactional
public class ProjectRecommendServiceImpl implements ProjectRecommendService {

	@Autowired
	private ProjectRecommendDao projectRecommendDao;

	@Override
	public void add(ProjectRecommend projectRecommend) {

		projectRecommendDao.save(projectRecommend);
	}

	@Override
	public Long countProjectRecommend(int projectId) {

		return projectRecommendDao.countRecommend(projectId);
	}

	@Override
	public List<ProjectRecommend> listRecommenders(int projectId) {

		return projectRecommendDao.listRecommender(projectId);
	}

	@Override
	public ProjectRecommend findProjectRecommend(int pid, int uid) {
		return projectRecommendDao.getProjectRecommend(pid, uid);
	}

}